package com.gitee.wsl.collections.delegate

/**
 * List type that delegates to another implementation.
 *
 * @param <T>
 * List item type.
 *
 * @author Matt Coley
</T> */
open class DelegatingList<T>( protected open val delegate: List<T>) : List<T> by delegate {
//    override fun get(index: Int): T = delegate.get(index)
//    override fun indexOf(element: T): Int = delegate.indexOf(element)
//    override fun lastIndexOf(element: T): Int  = delegate.lastIndexOf(element)
//    override fun listIterator(): ListIterator<T> = delegate.listIterator()
//    override fun listIterator(index: Int): ListIterator<T> = delegate.listIterator(index)
//    override fun subList(fromIndex: Int, toIndex: Int): List<T> = delegate.subList(fromIndex,toIndex)

//    override fun containsAll(elements: Collection<T>): Boolean {
//        return delegate.containsAll(elements)
//    }
//
//    override fun isEmpty(): Boolean {
//        return delegate.isEmpty()
//    }
//
//    override fun contains(element: T): Boolean {
//        return delegate.contains(element)
//    }
//
//    override fun iterator(): Iterator<T> {
//        return delegate.iterator()
//    }
//
//    override val size: Int
//        get() = delegate.size


}

open class DelegatingMutableList<T>(protected open val delegate: MutableList<T>) :  MutableList<T> by delegate{
//    override fun containsAll(elements: Collection<T>): Boolean {
//        return delegate.containsAll(elements)
//    }
//
//    override fun indexOf(element: T): Int {
//        return delegate.indexOf(element)
//    }
//
//    override fun isEmpty(): Boolean {
//        return delegate.isEmpty()
//    }
//
//    override fun lastIndexOf(element: T): Int {
//        return delegate.lastIndexOf(element)
//    }
//
//    override fun listIterator(): MutableListIterator<T> {
//        return delegate.listIterator()
//    }
//
//    override fun listIterator(index: Int): MutableListIterator<T> {
//        return delegate.listIterator(index)
//    }
//
//    override fun contains(element: T): Boolean {
//        return delegate.contains(element)
//    }
//
//    override fun get(index: Int): T {
//        return delegate[index]
//    }
//
//    override fun iterator(): MutableIterator<T> {
//        return delegate.iterator()
//    }
//
//    override fun subList(fromIndex: Int, toIndex: Int): MutableList<T> {
//        return delegate.subList(fromIndex, toIndex)
//    }
//
//    override val size: Int
//        get() = delegate.size

}